package com.appjishu.web.biz.service;

import com.appjishu.web.biz.dao.GameConfMapper;
import com.appjishu.web.biz.dao.UserGameLogMapper;
import com.appjishu.web.biz.dao.UserMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GameLogService {
    @Autowired
    private UserGameLogMapper gameLogMapper;
    @Autowired
    private UserMapper userMapper;
    @Autowired
    private GameConfMapper gameConfMapper;

    public void gameLog(Long userId,Integer gameId){
        Integer point = gameConfMapper.point(gameId);
        gameLogMapper.scoreAdd(userId,gameId,point);
        userMapper.totalScore(userId,point);
    }

}
